Reconfiguring monitoring circuitry

ABSTRACT

A method of reconfiguring a current debug configuration of a debug unit connected to a peripheral circuit on an integrated circuit chip. The method comprises the debug unit collecting debug data of the peripheral circuit and outputting the debug data in a message stream. The debug unit receives a debug reconfiguration command. The debug unit transmits an indication of the current debug configuration, then reconfigures the current debug configuration to a new debug configuration in accordance with the debug reconfiguration command, then transmits an indication of the new debug configuration. The indication of the current debug configuration and the indication of the new debug configuration are transmitted adjacent to the debug data in the message stream.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of and claims priority to U.S. patentapplication Ser. No. 15/906,730, filed on Feb. 27, 2018, which claimspriority to U.S. patent application Ser. No. 15/235,597, filed on Aug.12, 2016, which claims priority to United Kingdom Patent Application No.GB1514301.9, filed on Aug. 12, 2015, the entire contents of each ofwhich are incorporated herein by reference.

BACKGROUND

This disclosure relates to debugging peripheral circuits, such asprocessors, on an integrated circuit chip. The disclosure isparticularly relevant to debugging peripheral circuits which form partof a System-on-Chip (SoC).

In the past, an embedded system which had multiple core devices(processors, memories etc.) would have been incorporated onto a PrintedCircuit Board (PCB) and connected on the PCB via buses. Traffic in theembedded system was conveyed over these buses. This arrangement wasconvenient for debugging the core devices, because debugging tools suchas oscilloscopes and logic analyzers could be attached to the PCB'sbuses allowing direct access to the core devices.

Market demand for smaller products coupled with advances insemiconductor technology has led to the development of System-on-Chip(SoC) devices. In a SoC, the multiple core devices of an embedded systemare integrated onto a single chip. In a SoC, the traffic in the embeddedsystem is conveyed over internal buses, thus connection of debuggingtools directly to the system bus is no longer possible. The resultingreduced access coupled with an increasing quantity of data beingtransported around the chip (due to developments of SoC technologyleading to integration of multiple processing cores and higher internalclocking frequencies), has reduced the ability of external debuggingtools to find and solve bugs within the system in the timescalesdemanded by the industry.

Thus, the development of SoC devices required associated development indebugging technology, which lead to the integration of some debugfunctionality onto the SoC. It is now customary for each core device tohave an associated debug unit. Typically, the debug unit can observe thecore device, for example by collecting trace data from that core device.The collected debug data is assembled into debug messages and routedthrough the integrated circuit chip, typically to be funneled off chipvia a debug port to an external debug controller.

The debug controller selects the type of trace data that is to becollected by setting the configuration of the debug unit. For example,that configuration may specify parameters of internal filters of thedebug unit; the debug unit only collecting and outputting trace datawhen the parameters of those filters are met. In order to accuratelyprocess a portion of trace data, the debug controller needs to knowwhich configuration the debug unit had at the time the portion of tracedata was collected. When the debug controller instructs the debug unitto change configuration, there is a period of time during which thedebug controller receives trace data but does not know whichconfiguration the debug unit had at the time that trace data wascollected. To solve this problem, the debug controller may instruct thedebug unit to stop tracing prior to instructing the debug unit to changeconfiguration, and then instruct the debug unit to start tracing againafter the debug unit has changed configuration. However, this solutionresults in a period of time during which trace data is not collected,and hence a period of time during which the debug controller is unableto analyse the core device.

SUMMARY OF THE INVENTION

According to a first aspect of this disclosure, there is provided amethod of reconfiguring a current debug configuration of a debug unitconnected to a peripheral circuit on an integrated circuit chip, themethod comprising, at the debug unit: collecting debug data of theperipheral circuit and outputting the debug data in a message stream;receiving a debug reconfiguration command; transmitting an indication ofthe current debug configuration, then reconfiguring the current debugconfiguration to a new debug configuration in accordance with the debugreconfiguration command, then transmitting an indication of the newdebug configuration; wherein the indication of the current debugconfiguration and the indication of the new debug configuration aretransmitted adjacent to the debug data in the message stream.

Suitably, the debug data collected prior to transmitting the indicationof the current debug configuration is collected in accordance with thecurrent debug configuration, and the debug data collected aftertransmitting the indication of the new debug configuration is collectedin accordance with the new debug configuration.

Suitably, the indication of the current debug configuration is a firstmarker embedded by the debug unit into the debug data, and theindication of the new debug configuration is a second marker embedded bythe debug unit into the debug data.

The first and second markers may be change of configuration markerswhich identify whether or not the debug configuration of the debug unithas changed.

Suitably, the first marker identifies the current debug configuration,and the second marker identifies the new debug configuration.

The debug unit may embed the first and second markers into the debugdata prior to buffering the debug data.

Suitably, the indication of the current debug configuration and theindication of the new debug configuration are control messagestransmitted adjacent to the debug data messages in the message stream.

The indication of the current debug configuration may comprise thecurrent debug configuration, and the indication of the new debugconfiguration may comprise the new debug configuration.

Suitably, in response to receiving only the single debug reconfigurationcommand, the debug unit transmits an indication of the current debugconfiguration, then reconfigures the current debug configuration to anew debug configuration in accordance with the debug reconfigurationcommand, then transmits an indication of the new debug configuration.

The method may further comprise, at the debug unit: receiving a retrievedebug configuration command, and in response transmitting the indicationof the current debug configuration; after receiving the retrieve debugconfiguration command, receiving the debug reconfiguration command, andin response reconfiguring the current debug configuration to the newdebug configuration; and after receiving the debug reconfigurationcommand, receiving a further retrieve debug configuration command, andin response transmitting the indication of the new debug configuration.

Suitably, the debug unit continues to collect debug data and output thedebug data in the message stream throughout the reconfiguration method.

Suitably, the debug unit outputs the debug data, the indication of thecurrent debug configuration, and the indication of the new debugconfiguration to a debug controller, and the debug controller discardsdebug data received from the debug unit between receipt of theindication of the current debug configuration and receipt of theindication of the new debug configuration.

Suitably, the method further comprises, at the debug unit, haltingcollection of debug data of the peripheral circuit and haltingoutputting the debug data into the message stream between the times atwhich the indication of the current debug configuration is transmittedand the indication of the new debug configuration is transmitted.

The new debug configuration may be a compound debug configuration forconfiguring a plurality of sub-units of the debug unit.

Suitably, at least some of the sub-units are filters, and the compounddebug configuration sets parameters of those filters which determineswhen debug data of the peripheral circuit is collected.

The debug unit may: output the debug data, the indication of the currentdebug configuration, and the indication of the new debug configurationto an off-chip debug controller; and receive the debug reconfigurationcommand from the off-chip debug controller.

The debug unit may: output the debug data, the indication of the currentdebug configuration, and the indication of the new debug configurationto an on-chip debug controller; and receive the debug reconfigurationcommand from the on-chip debug controller.

According to a second aspect of this disclosure, there is provided anintegrated circuit chip comprising: a debug unit connected to aperipheral circuit, the debug unit having a current debug configuration,and being configured to collect debug data from the peripheral circuitand output that debug data in a message stream; the debug unit beingfurther configured to: receive a debug reconfiguration command; transmitan indication of the current debug configuration, then reconfigure thecurrent debug configuration to a new debug configuration in accordancewith the debug reconfiguration command, then transmit an indication ofthe new debug configuration; wherein the debug unit is configured totransmit the indication of the current debug configuration and theindication of the new debug configuration adjacent to the debug data inthe message stream.

Suitably, the debug unit comprises a plurality of sub-units, and the newdebug configuration is a compound debug configuration, the debug unitbeing configured to configure the sub-units with the compound debugconfiguration. At least some of the sub-units may be filters, the debugunit being configured to set parameters of the filters with the compounddebug configuration.

The integrated circuit chip may further comprise an on-chip debugcontroller, the debug unit being configured to: output the debug data,the indication of the current debug configuration, and the indication ofthe new debug configuration to the on-chip debug controller; and receivethe debug reconfiguration command from the on-chip debug controller.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will now be described by way of example withreference to the accompanying drawings. In the drawings:

FIG. 1 is a schematic drawing of an exemplary debug architecture on anintegrated circuit chip device;

FIG. 2 is a schematic drawing of an exemplary debug architecture on anintegrated circuit chip device;

FIG. 3 is a schematic drawing of an exemplary debug architecturecomprising a shared hub;

FIG. 4 is a schematic drawing of an exemplary debug architecturecomprising a mesh network;

FIG. 5 illustrates a message sequence of an exemplary debugreconfiguration method; and

FIG. 6 illustrates a message sequence of a further exemplary debugreconfiguration method.

DETAILED DESCRIPTION

The following disclosure describes a debug architecture suitable forimplementation on a SoC or an MCM.

FIGS. 1 to 4 are schematic diagrams of exemplary debug architectures,and components within debug architectures. These figures present thestructures in terms of functional blocks. Some functional blocks forcarrying out functions well known in the art have in places been omittedfrom these figures. FIGS. 5 and 6 are message sequences illustratingmethods of reconfiguring the debug configuration of the debuggingcircuitry. Each message sequence depicts an order in which the method ofthat message sequence can be performed. However, the message sequencesare not intended to restrict the described methods to being implementedin the orders depicted. The steps of the methods may be carried out inalternative orders to those depicted in the message sequences.

FIG. 1 illustrates the general structure of an exemplary debugarchitecture for a SoC 100. Debugging circuitry 101 is arranged to debugsystem circuitry 102. FIG. 2 illustrates exemplary system circuitrycomprising core devices and a communication interface. The core devices201, 202 and 203 of the SoC are peripheral circuits to the debuggingcircuitry, each of which is connected to the debugging circuitry 101.Although FIG. 2 illustrates three core devices, any number of coredevices can be suitably integrated into the debug architecture.Exemplary core devices include a DSP (digital signal processor), videoprocessor, applications processor or CPU (central processor unit),graphics processor, system memory, bus, system interconnect, RTOS(real-time operating system), software, data, custom circuit and a dataengine. However, any component of a SoC is suitable for beingincorporated into the debug architecture as a core device on FIG. 2. Thecore devices may be emulators or simulators of other devices on thechip. For example, a core device may emulate a processor.

The debugging circuitry is able to manipulate the operation of the coredevices and monitor the operation of the core devices. The debuggingcircuitry is connected to a communication interface 204. Communicationinterface 204 may be configured to communicate with entities off-chip.For example, debugging circuitry 101 may communicate with an off-chipdebug controller via communication interface 204. Communicationinterface 204 may also be configured to communicate with other entitieson-chip. For example, debugging circuitry 101 may communicate with anon-chip debug controller via communication interface 204. Although FIG.2 illustrates one communication interface, any number of communicationinterfaces can be integrated onto the SoC. The communication interfacesimplemented are chosen in dependence on the type of connections that areto be made. Exemplary communication interfaces include: traditionaldebug interfaces such as JTAG, parallel trace input/output, and Aurorabased high-speed serial interface; and reuse of system interfaces suchas USB, Ethernet, RS232, PCIe and CAN.

The structure of the debugging circuitry is implementation-dependent.FIG. 3 illustrates an example in which the debugging circuitry comprisesa shared hub 304, debug units 301, 302, 303 and a communication adapter305. In FIG. 3, each core device 201, 202, 203 of the SoC isrespectively connected to its own debug unit 301, 302, 303. The debugunits may be configured to passively or actively observe the attachedcore device. A debug unit which passively observes a core device islimited to analysing the output of that core device. Conversely, a debugunit which actively observes a core device may analyse the output of thecore device, and additionally may control the core device to modify itsoperation. For example, the debug unit may control the core device toslow down the speed at which the core device operates or to stop aprocessor of the core device and restart it again. The communicationinterface 204 is connected to a communication adapter 305. Thecommunication adapter adapts signals that it receives to a format thatis suitable for the communication interface that it is connected to. Thecommunication interface 204 communicates signals to an off-chip debugcontroller 306. Each debug unit and the communication adapter isconnected to a shared hub 304. Shared hub 304 routes signals between thedevices on the chip. For example, the shared hub routes messages betweenthe debug units. The shared hub also routes messages between thecommunication adapter and the debug units. The shared hub may alsocomprise resources which are shared between the debug units. Forexample, the shared hub may comprise a shared buffer for use by thedebug units. By locating such resources in the shared hub as opposed toin the debug units, the debug units are made smaller and hence can bemore easily integrated across the chip.

FIG. 4 illustrates another exemplary structure of the debuggingcircuitry which comprises a mesh network of nodes 403, 404, 405, 406 anddebug units 400, 401. In FIG. 4, core devices 201 and 202 are bothconnected to the same debug unit 400. Core device 203 is not directlyconnected to a debug unit. Debug unit 401 is connected to node 405 ofthe mesh network, but not directly connected to a core device. Thecommunication interface 204 communicates signals to an on-chip debugcontroller 402. The mesh network of nodes routes messages between thecomponents of the SoC.

The debugging circuitry may comprise other types of interconnection forrouting messages between components of the SoC. For example, thedebugging circuitry may comprise a bus or a ring network. Alternatively,the debugging circuitry may comprise any combination of one or moreshared hubs, buses, ring networks and mesh networks.

The debugging circuitry comprises one or more debug units. A debug unitmay be directly connected to a core device (as shown in FIG. 3). A debugunit may be directly connected to more than one core device (as shown inFIG. 4). A debug unit may be not directly connected to a core device,but connected to the interconnection of the debugging circuitry (asshown in FIG. 4).

Suitably, the debugging circuitry is controlled by a debug controller.As described above, the debug controller may be located off-chip oron-chip. An alternative configuration may be implemented in which bothan on-chip and an off-chip debug controller are used. In this situation,the off-chip debug controller is the dominant controller, in other wordsit acts as a master to the on-chip debug controller.

Suitably, the components of the debugging circuitry communicate usingdebug messages. These messages may be assembled into packets fortransporting through the integrated circuit chip. The debug messages maycontain control information to control the operation of part of thedebugging circuitry or system circuitry. Alternatively, the debugmessages may contain debug data. For example, the debug data may betrace data. Trace data is the output of a component of the systemcircuitry which a debug unit has recorded passively whilst thatcomponent of the system circuitry continues executing. The trace datamay be program traces or data traces. As another example, the debug datamay be the state of a component of the system circuitry or the state ofa component of the debugging circuitry. For example, the debug data maybe a state of a performance counter. Performance counters may be used tocount a variety of events from system circuitry, such as signal edges,clock cycles a signal is high or low for, time spent in a givenoperational state, time a register is at a specific value or within aprescribed range, or error conditions. This type of debug data may beused to infer the state or operation of part of the system circuitry, orto identify whether specific events have or have not occurred.

As mentioned above, the debug controller may be either on-chip, off-chipor both. Regardless of its location, the debug controller selects thetype of debug data that is to be collected by setting the configurationof the debugging circuitry. The debug controller sets the configurationof the debugging circuitry by sending one or more commands to thedebugging circuitry 101 via the communication interface 204. Asmentioned above, the debugging circuitry typically comprises one or moredebug units. The reconfiguration command may include shared debug-unitlevel configuration, for example (i) whether the debug unit is enabled,(ii) timer configuration, (iii) which flow to send debug messages on,and (iv) whether to throttle the debug data. Each debug unit may onlyhave one set of configuration registers.

Thus, the debug unit only stores one debug configuration at a time. Thedebug configuration may be changed in multiple steps. The debugconfiguration may be changed whilst debug data is being generated andoutput to the debug controller. Alternatively, each debug unit may havea first and second set of configuration registers. Thus, the debug unitis able to preload a new debug configuration into the second set ofconfiguration registers whilst generating and outputting debug data inaccordance with a current debug configuration in the first set ofconfiguration registers. The debug unit is then able to switch to thenew debug configuration more quickly than if the debug unit only has oneset of configuration registers.

The debug units themselves typically comprise several sub-units, forexample filters and counters. In an example, one of the sub-units of adebug unit is a filter, and the debug reconfiguration command comprisesa new configuration of the filter. The new configuration specifies theparameters of the filter. The parameters of the filter affect theoperation of the filter. The filter may be used to determine when tracedata is collected and outputted. For example, trace data may only becollected when the parameters of the filter are met.

A debug reconfiguration command sent by the debug controller to thedebugging circuitry may comprise a compound debug configuration. Thecompound debug reconfiguration command may be sent in a single controlmessage from the debug controller to the debugging circuitry.Alternatively, the compound debug reconfiguration command may betransmitted from the debugging circuitry in a plurality of controlmessages. This compound debug configuration may comprise a configurationstate for a debug unit as a whole. Additionally, or alternatively, thecompound debug configuration may comprise one or more configurations forconfiguring a plurality of sub-units of the debug unit. The sameconfiguration may be applied to a plurality of the sub-units of thedebug unit. Different configurations may be applied to a plurality ofthe sub-units of the debug unit. Those sub-units may, for example,comprise a set of filters and a plurality of counters, each filterassociated with a set of counters. Thus, taking the example of a debugunit having four filters, each having four counters associated with it,this results in 16 subunits. Each of these 16 sub-units receivesconfiguration from the debug controller via an individually receiveddebug configuration command or a compound debug configuration command.In another example, the sub-units may comprise a set of filters and aplurality of counters which are configured independently, such that thecounters are configured to act depending on the outcome of the filteringprocess. In this case, the number of counters is independent of thenumber of filters, thus for example, a debug unit may comprise fourfilters and eight counters totaling 12 sub-units in total. In anotherexample, a sub-unit may comprise a counter in combination with a filter,which are used together to perform an operation. For example, in orderto count all bus transactions writing to address x, a filter may filterthose transactions writing to address x, and the counter count thefiltered transactions. A condition of the filter may be that when thecounter reaches count M, a trigger is generated. In another example, thesub-units may comprise hierarchical filters. The hierarchical filtersmay comprise a first layer filter, followed by several second layerfilters. For example, the first layer filter may filter transactions toaddress A. Only those transactions to address A are then filtered by thesecond layer filters, each of which filters by a different ID. A counteris associated with each second layer filter, which increments when atransaction to address A with its second layer filter ID occurs.

In order to be able to usefully analyse the debug data it receives, thedebug controller needs to know the configuration of the debuggingcircuitry at the time that that debug data was collected. Prior tosending the debug reconfiguration command, the debug controller knowsthat the debug data it has received was collected in accordance with thecurrent (old) debug configuration. The debug controller knows thatfollowing sending the debug reconfiguration command, at some unknownfuture time, the debug data it receives will have been collected inaccordance with the new (reconfigured) debug configuration of the debugreconfiguration command. In between these times, there is a window ofuncertainty as to which configuration was applied to the debuggingcircuitry at the time that the debug data was collected. The debugcontroller does not know whether the current debug configuration or thenew debug configuration was applied, or whether the new debugconfiguration was partially applied such that some sub-units of thedebugging circuitry were operating under the current debug configurationand some were operating under the new debug configuration.

The following describes methods of reconfiguring the debugging circuitryin such a way as to reduce the window of uncertainty as to which debugconfiguration was applied to the debugging circuitry at the time thatthe debug data was collected.

In the implementations described herein, the debugging circuitrytransmits an indication of the current debug configuration to the debugcontroller immediately before changing the current debug configurationto the new debug configuration in accordance with the debugreconfiguration command. Additionally, the debugging circuitry transmitsan indication of the new debug configuration to the debug controllerimmediately after changing the current debug configuration to the newdebug configuration. The debug data collected by the debugging circuitryprior to transmitting the indication of the current debug configurationis collected in accordance with the current (old) debug configuration.The debug data collected by the debugging circuitry after transmittingthe indication of the new (reconfigured) debug configuration iscollected in accordance with the new debug configuration. Both themessage comprising the indication of the current debug configuration andthe message comprising the indication of the new debug configuration aretransmitted adjacent to the debug data in the debug message streamtransmitted from the debugging circuitry 101 through the communicationinterface 204 to the debug controller. The message comprising theindication of the current debug configuration and the message comprisingthe indication of the new debug configuration are interleaved into thedebug message stream in such a way as to be time-synchronised with thecollected debug data in the debug message stream. Thus, the debugcontroller considers the debug data it receives from the debuggingcircuitry up until receipt of the indication of the current debugconfiguration to be validated as having been collected whilst thedebugging circuitry had the current debug configuration. Similarly, thedebug controller considers the debug data it receives from the debuggingcircuitry immediately after receipt of the indication of the new debugconfiguration to be validated as having been collected whilst thedebugging circuitry had the new debug configuration.

FIG. 5 illustrates a message sequence between the debug controller andthe debugging circuitry in a first method of reconfiguring the debugconfiguration of the debugging circuitry. Initially, debugging circuitryis collecting debug data (501) and outputting that debug data (502) tothe debug controller in accordance with its current debug configuration.The debug controller sends a command to the debugging circuitry toretrieve the debug configuration (503). In response, the debuggingcircuitry retrieves the current debug configuration (504), and transmitsthe current debug configuration to the debug controller (505). Onreceiving the current debug configuration, the debug controller thensends a command to the debugging circuitry to reconfigure the debugconfiguration to the new debug configuration (506). In response, thedebugging circuitry reconfigures the current debug configuration of thedebugging circuitry to the new debug configuration (507). The debugcontroller then sends a command to the debugging circuitry to retrievethe debug configuration (508). In response, the debugging circuitryretrieves the new debug configuration (509), and transmits the new debugconfiguration to the debug controller (510). The debugging circuitrythen collects and outputs debug data (511) in accordance with the newdebug configuration.

Although FIG. 5 depicts the debug controller as waiting until it hasreceived the current debug configuration at message 505 before sendingthe debug reconfiguration command at message 506, the debug controllermay alternatively send the debug reconfiguration command 506 before ithas received the current debug configuration 505.

The debugging circuitry may continue to collect and transmit debug datato the debug controller during the debug reconfiguration method. This isillustrated on FIG. 5 by optional debug data messages 512, 513, 514 and515. In this case, the debug controller may discard debug data messagesreceived from the debugging circuitry between receipt of the currentdebug configuration message 505 and receipt of the new debugconfiguration message 510. Alternatively, the debug controller mayretain the debug data messages 512, 513, 514 and 515. In some situationsthis debug data may still be useful even though the debug controllerdoes not know which debug configuration was implemented at the time thatthat debug data was generated. In an example, a first debugconfiguration causes the debugging circuitry to count the number oftransactions satisfying narrow filtering criteria. Having not countedany transactions, the debug controller issues a second debugconfiguration which causes the debugging circuitry to count the numberof transactions satisfying broader filtering criteria which encompassthe narrow filtering criteria. Having still not counted anytransactions, a deduction may be made that no transactions satisfyingthe narrow filtering criteria occurred during the time periods that anyof the following configurations applied: the narrow filtering criteria,the changeover to the broader filtering criteria, and the broaderfiltering criteria. This deduction is only valid if the debug datamessages during the changeover period are retained and their contentanalysed by the debug controller.

Alternatively, as part of, or an adjacent subsequent message to, theretrieve debug configuration message 503, the debug controller mayinstruct the debugging circuitry to halt collection of debug data of theportions of the system circuitry that are monitored by the portions ofthe debugging circuitry which the debug configuration has been retrievedin respect of. Then, as part of, or an adjacent subsequent message to,the retrieve debug configuration message 508, the debug controller mayinstruct the debugging circuitry to restart collection of debug data ofthe portions of the system circuitry that are monitored by the portionsof the debugging circuitry which the debug configuration has beenretrieved in respect of.

The debugging circuitry may prioritise outputting the current debugconfiguration message (505) and the new debug configuration message(510) over outputting the debug data (512, 513, 514, 515). The debuggingcircuitry may implement this by halting or delaying output of the debugdata in order to have a sufficient length time slot to send the debugconfiguration messages (505, 510).

FIG. 6 illustrates a message sequence between the debug controller andthe debugging circuitry in a second method of reconfiguring the debugconfiguration of the debugging circuitry. Initially, debugging circuitryis collecting debug data (601) and outputting that debug data (602) tothe debug controller in accordance with its current debug configuration.The debug controller sends a command to the debugging circuitry toreconfigure the debug configuration to the new debug configuration(603). The debugging circuitry continues to collect and transmit debugdata (604) until it has received and processed the debug reconfigurationcommand 603. On receiving and processing the debug reconfigurationcommand 603, the debugging circuitry responds by performing thefollowing series of steps in immediate succession: (i) retrieving thecurrent debug configuration (605) and sending the current debugconfiguration to the debug controller (606), (ii) reconfiguring thecurrent debug configuration of the debugging circuitry to the new debugconfiguration (607), and (iii) retrieving the new debug configuration(608) and sending the new debug configuration to the debug controller(609). The debugging circuitry then collects and outputs debug data(610) in accordance with the new debug configuration.

The debugging circuitry sends the current debug configuration (606),changes the configuration of the debugging circuitry (607), and sendsthe new debug configuration (609) all as adjacent actions. The twomessages 606 and 609 are sent in the same message cycle or consecutivemessage cycles. Suitably, the two messages 606 and 609 form part of thesame message packet to the debug controller. When these actions areperformed in immediate succession, no trace data is collected ortransmitted by the debugging circuitry during the actions of retrievingand sending the current debug configuration, reconfiguring the debuggingcircuitry, and retrieving and sending the new debug configuration.

A sufficient time slot is required to send the new debug configuration.The debugging circuitry may delay reconfiguring the debugging circuitry(607) by a short time period until there is a sufficient length timeslot to send the new debug configuration (609) such that the new debugconfiguration message (609) immediately follows the change of debugconfiguration. The debugging circuitry may delay initiating the processof retrieving (605) and sending the current debug configuration (606),reconfiguring the debugging circuitry (607), and retrieving (608) andsending the new debug configuration (609) until there is a sufficientlength time slot to send both the current debug configuration (606) andthe new debug configuration (609) in the same message cycle (or adjacentmessage cycles depending on the implementation).

The debugging circuitry may not send the current debug configurationmessage 606. Instead, in response to the debug reconfiguration command,the debugging circuitry may reconfigure the debugging circuitry and thenimmediately send the new debug configuration message 609.

Suitably, the debug reconfiguration command (506, 603) is sent as acontrol message from the debug controller to the debugging circuitry.Similarly, in the implementation in which the retrieve debugconfiguration commands (503, 508) are sent from the debug controller tothe debugging circuitry, these too are sent as control messages.

The messages that the debugging circuitry sends back to the debugcontroller comprising the debug configuration applied at the time (i.e.current debug configuration message (505, 606) and new debugconfiguration message (510, 609)) are also control information. Thesemay be sent as control messages.

As described above, preferably, the components of the debug architecturecommunicate only using messages. Each interface between a pair ofcomponents of the architecture is configured to transport any message,whether that message comprises control data, debug data or other typesof data. Suitably, the interface transports the messages over aplurality of flows. The flows are assigned different relativeproperties. Each message identifies the flow that it is transported onvia a flow identifier comprised in the header of the message. The flowassociated with a message may be used to determine whether to transportthe message, and when to transport the message. The flow may also beused by the entity receiving the message to decide whether to store thecontent of the message, discard the message, or route the message ontoanother entity. Data transported on the different flows may besegregated by data type, for example control data may be transported ona different flow to debug data. Different communication mechanisms maybe used on the different flows to suit the nature of the data beingtransported. For example, a communication mechanism having a higherquality of service may be used for the control flow compared to thedebug data flow since the integrity of the control data is critical. Acommunication mechanism with a faster data rate but lower quality ofservice may be used for the debug data flow in order to maximise theamount of debug data which is transported. Suitably, the control flow isprioritised over the debug data flow in order to guarantee transport ofthe control data whilst enabling transport of the debug data on abest-efforts basis. The control flow and the debug data flow arelogically different flows but configured to be transported over the samephysical flow. The control flow and the debug data flow are interleavedbefore leaving the debugging circuitry, for transport to the debugcontroller.

The messages comprising the currently applied debug configuration (505,510, 606, 609) may be control messages sent on the same control flowthat the debug controller used to send the debug reconfiguration command(506, 603) and optionally the retrieve debug configuration commands(503, 508). The control flow and the debug data flow are interleavedbefore leaving the debugging circuitry, thus the messages comprising thecurrently applied debug configuration (505, 510, 606, 609) areinterleaved and synchronised with the debug data messages generated whenthe debugging circuitry had the corresponding debug configuration. Boththe messages comprising the currently applied debug configuration (505,510, 606, 609) and the corresponding debug data messages are sent in thesame message packet to the debug controller.

Timestamps may be applied to control messages on the control flow andalso to debug data messages on the debug data flow. For example, thedebugging circuitry may apply a timestamp to each debug configuration onretrieving the debug configuration. Alternatively, the debuggingcircuitry may apply a timestamp to each control message on creation ofthat control message. Suitably, when the debugging circuitry interleavesthe control flow and the debug data flow, it does so in time orderaccording to the timestamps on the respective flows. Alternatively, thedebugging circuitry may interleave the control flow and the debug dataflow without reference to the timestamps. The debug controller may thenreconstruct the time order of the control messages and the debug datamessages with reference to their respective timestamps. There may be afinite set of timestamp values, and hence any one timestamp value isreused periodically. Suitably, a time index is inserted (for example byshared hub 304) onto all logical flows. This time index is incrementedwhen the timestamp value set begins another repeat, i.e. when thetimestamp values wrap around. Thus, if the debug data flow istransporting messages much more slowly than the control flow (or viceversa), the debugging circuitry/debug controller is able to retainsynchronisation by matching together debug data messages and controlmessages having the same timestamp value and the same time index value.

In another implementation, the messages that the debugging circuitrysends back to the debug controller comprising the debug configurationapplied at the time (i.e. current debug configuration message (505, 606)and new debug configuration message (510, 609)) may be sent on the debugdata flow. Suitably, the information is embedded in the debug data bythe debugging circuitry. The debugging circuitry may identify thecontrol flow that the control command from the debug controller (503,506, 508, 603) was sent on in the response that is sent on the debugdata flow.

Taking a particular debug unit as an example, the debug unit iscollecting trace data from a connected core device, and buffering thistrace data prior to outputting it in a trace flow to the communicationinterface to be forwarded to the debug controller. In the case of themethod of FIG. 5, the debug unit receives the retrieve debugconfiguration command 503. The debug unit retrieves its current debugconfiguration and inputs it to the trace data buffer. The debug unitthen continues to collect trace data and input this to the trace databuffer. The debug unit then receives the debug reconfiguration command506. The debug unit changes the debug configuration in accordance withthe debug reconfiguration command and starts to collect trace data inaccordance with the new debug configuration and input this to the tracedata buffer. The debug unit then receives the retrieve debugconfiguration command 508. The debug unit responds by retrieving itsdebug configuration which is now the new debug configuration andinputting this to the trace data buffer. The debug unit then continuesto collect trace data and input this to the trace data buffer. Thebuffered data is then output on the trace flow to the debug controller.Thus, the configuration control information is synchronised to the tracedata. This method ensures better synchronisation of the configurationcontrol information and the trace data since the configuration controlinformation is inserted into the trace data flow on collection of thetrace data prior to any buffering steps. The configuration controlinformation and the trace data propagate through the internal pathwaysof the SoC in synchronisation.

In the case of the method of FIG. 6, the debug unit receives the debugreconfiguration command 603. In response, the debug unit retrieves itscurrent debug configuration and inputs this to the trace data buffer.The debug unit immediately follows this action by changing the debugconfiguration in accordance with the debug reconfiguration command.

The debug unit immediately follows this action by retrieving its newdebug configuration and inputting this to the trace data buffer. Thedebug unit then continues to collect trace data and input this to thetrace data buffer. The buffered data is then output on the trace flow tothe debug controller. Thus, the configuration control information issynchronised to the trace data. This method ensures bettersynchronisation of the configuration control information and the tracedata since the configuration control information is inserted into thetrace data flow on collection of the trace data prior to any bufferingsteps. The configuration control information and the trace datapropagate through the internal pathways of the SoC in synchronisation.

The above describes the debugging circuitry as sending the current debugconfiguration and the new debug configuration to the debug controller.Instead of sending the actual applied debug configuration, the debuggingcircuitry may send some other indication of the debug configuration. Forexample, the debugging circuitry may send a marker, such as a numericalidentifier, which identifies the applied debug configuration.Alternatively, the debugging circuitry may send a marker whichidentifies that the debug configuration has changed or not changed sincethe last time it reported the indication of the applied debugconfiguration. Since the debug controller instructed the debuggingcircuitry to change the debug configuration to a new debugconfiguration, a marker identifying that the debug configuration is thesame or has changed is sufficient for the debug controller to inferwhich debug configuration is applied. Thus, in the example of thepreceding two paragraphs, the debug unit sends an indication of thedebug configuration by inserting a marker into the trace data bufferwhich indicates whether the debug configuration is the same as before orhas changed. This marker is synchronised with the trace data that it isembedded in. Suitably, in a multi-debug controller architecture, themarker indicating the debug configuration also identifies which debugcontroller initiated the debug configuration command sequence.

The trace decoder at the debug controller receives the marker. If themarker indicates that the debug configuration is the same as before,then the trace decoder does not alter its parameters and continues todecode the subsequently received trace data as before. If the markerindicates that the debug configuration has changed, then the tracedecoder looks up the new debug configuration, and changes theconfiguration of the trace decoder in accordance with the new debugconfiguration. The trace decoder may alter its parameters such that thetrace data is decoded in a different way. The trace decoder may alterits parameters to forward the subsequently received trace data to adifferent part of the debug controller.

In retrieve debug configuration messages 503, 508, the debug controllermay request that the debugging circuitry retrieve all or a part of thedebug configuration that is to be changed. This is a sub-set of thetotal current state of the debugging circuitry. Similarly, in themessages that the debugging circuitry sends to the debug controllerspecifying the applied debug configuration (505, 510, 606, 609), thedebugging circuitry may send all or part of the debug configuration thatis to be changed.

In known systems, in order for the debug controller to identify whichdebug configuration was applied when the trace data was collected, thedebug controller instructs the debug unit to stop tracing the coredevice whilst the debug reconfiguration is occurring. The methodsdescribed herein enable the debugging circuitry to continue to collectdebug data of the core device whilst the debug reconfiguration isoccurring, and for the debug controller to know what the debugconfiguration was at the time that all, or almost all, of the debug datawas collected.

Each component of the SoCs illustrated in FIGS. 1 to 4 may beimplemented in dedicated hardware. Alternatively, each component of theSoC illustrated in FIGS. 1 to 4 may be implemented in software. Somecomponents may be implemented in software, whilst other components areimplemented in dedicated hardware.

Suitably, debugging circuitry 101 including any debug units andcommunication interfaces are hardware circuits forming part of SoC 100.Preferably, debug units for controlling and/or monitoring complex coredevices and peripherals such as processors use suitably complex statemachines as part of their control unit. Suitably, communicationinterfaces use suitably complex state machines to implement theircomplex protocols. Various approaches to realising state machines areknown. Such state machines can be realised using: (i) only logic gates;(ii) a combination of logic gates and memory, where the memory is usedto contain tables of values to simplify the state machine's operation orto make it programmable; or (iii) a processor core to execute softwarestored in memory. Where a processor core is used it can be: (i) integralto the specific debug unit, communication interface, or other debuggingcircuitry; or (ii) shared between several debug units to reduce theirimplementation resources and cost.

The SoC described is suitably incorporated within a computing-baseddevice. The computing-based device may be an electronic device.Suitably, the computing-based device comprises one or more processorsfor processing computer executable instructions to control operation ofthe device in order to implement the methods described herein. Thecomputer executable instructions can be provided using anycomputer-readable media such as a memory. Further software can beprovided at the computing-based device to implement the methodsdescribed herein. The methods described herein may be performed bysoftware in machine readable form on a tangible storage medium.

The above description describes the system circuitry and debuggingcircuitry as being comprised on the same SoC. In an alternativeimplementation, the system circuitry and debugging circuitry arecomprised across two or more integrated circuit chips of an MCM. In anMCM, the integrated circuit chips are typically stacked or locatedadjacently on an interposer substrate. Some system circuitry may belocated on one integrated circuit chip and other system circuitrylocated on a different integrated circuit chip of the MCM. Similarly,the debugging circuitry may be distributed across more than oneintegrated circuit chip of the MCM. Thus, the method and apparatusdescribed above in the context of an SoC also apply in the context of anMCM.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein, and without limitation to the scope ofthe claims. The applicant indicates that aspects of the presentinvention may consist of any such individual feature or combination offeatures. In view of the foregoing description it will be evident to aperson skilled in the art that various modifications may be made withinthe scope of the invention.

The invention claimed is:
 1. A method of reconfiguring a currentconfiguration of monitoring circuitry on an integrated circuit chip, themethod comprising, at the monitoring circuitry: collecting data relatedto monitoring a peripheral circuit and outputting the collected data ina message stream; transmitting an indication of the currentconfiguration of the monitoring circuitry; reconfiguring the currentconfiguration of the monitoring circuitry to a new configuration inaccordance with a reconfiguration command; and transmitting anindication of the new configuration of the monitoring circuitry; whereinthe indication of the current configuration of the monitoring circuitryand the indication of the new configuration of the monitoring circuitryare interleaved into the message stream to be time-synchronised with thecollected data in the message stream.
 2. A method as claimed in claim 1,wherein the indication of the current configuration of the monitoringcircuitry and the indication of the new configuration of the monitoringcircuitry are transmitted adjacent to the collected data in the messagestream.
 3. A method as claimed in claim 1, further comprising receivingthe reconfiguration command at the monitoring circuitry.
 4. A method asclaimed in claim 1, wherein the data collected prior to transmitting theindication of the current configuration of the monitoring circuitry iscollected in accordance with the current configuration of the monitoringcircuitry, and the data collected after transmitting the indication ofthe new configuration of the monitoring circuitry is collected inaccordance with the new configuration of the monitoring circuitry.
 5. Amethod as claimed in claim 1, wherein the indication of the currentconfiguration of the monitoring circuitry is a first marker embedded bythe monitoring circuitry into the collected data, and the indication ofthe new configuration of the monitoring circuitry is a second markerembedded by the monitoring circuitry into the collected data.
 6. Amethod as claimed in claim 5, wherein the first and second markers arechange of configuration markers which identify whether or not theconfiguration of the monitoring circuitry has changed.
 7. A method asclaimed in claim 5, wherein the first marker identifies the currentconfiguration of the monitoring circuitry, and the second markeridentifies the new configuration of the monitoring circuitry.
 8. Amethod as claimed in claim 5, wherein the monitoring circuitry embedsthe first and second markers into the collected data prior to bufferingthe collected data.
 9. A method as claimed in claim 1, wherein theindication of the current configuration of the monitoring circuitry andthe indication of the new configuration of the monitoring circuitry arecontrol messages transmitted adjacent to the collected data messages inthe message stream.
 10. A method as claimed in claim 1, wherein theindication of the current configuration of the monitoring circuitrycomprises the current configuration of the monitoring circuitry, and theindication of the new configuration of the monitoring circuitrycomprises the new configuration of the monitoring circuitry.
 11. Amethod as claimed in claim 3, wherein in response to receiving only asingle reconfiguration command, the monitoring circuitry transmits anindication of the current configuration of the monitoring circuitry,then reconfigures the current configuration of the monitoring circuitryto a new configuration of the monitoring circuitry in accordance withthe reconfiguration command, then transmits an indication of the newconfiguration of the monitoring circuitry.
 12. A method as claimed inclaim 1, further comprising, at the monitoring circuitry: receiving aretrieve configuration command, and in response transmitting theindication of the current configuration of the monitoring circuitry;after receiving the retrieve configuration command, receiving thereconfiguration command, and in response reconfiguring the currentconfiguration of the monitoring circuitry to the new configuration ofthe monitoring circuitry; and after receiving the reconfigurationcommand, receiving a further retrieve configuration command, and inresponse transmitting the indication of the new configuration of themonitoring circuitry.
 13. A method as claimed in claim 1, wherein themonitoring circuitry continues to collect data related to monitoring aperipheral circuit and output the collected data in the message streamthroughout the reconfiguration method.
 14. A method as claimed in claim13, wherein the monitoring circuitry outputs the collected data, theindication of the current configuration of the monitoring circuitry, andthe indication of the new configuration of the monitoring circuitry to acontroller, and wherein the controller discards collected data receivedfrom the monitoring circuitry between receipt of the indication of thecurrent configuration of the monitoring circuitry and receipt of theindication of the new configuration of the monitoring circuitry.
 15. Amethod as claimed in claim 1, further comprising, at the monitoringcircuitry, halting collection of data related to the peripheral circuitand halting outputting the collected data into the message streambetween the times at which the indication of the current configurationof the monitoring circuitry is transmitted and the indication of the newconfiguration of the monitoring circuitry is transmitted.
 16. A methodas claimed in claim 1, wherein the new configuration of the monitoringcircuitry is a compound configuration of the monitoring circuitry forconfiguring a plurality of sub-units of the monitoring circuitry,wherein at least some of the sub-units are filters, and the compoundconfiguration of the monitoring circuitry sets parameters of thosefilters which determines when data related to the peripheral circuit iscollected.
 17. A method as claimed in claim 1, wherein the monitoringcircuitry: outputs the collected data, the indication of the currentconfiguration of the monitoring circuitry, and the indication of the newconfiguration of the monitoring circuitry to an off-chip controller; andreceives the reconfiguration command from the off-chip controller.
 18. Amethod as claimed in claim 1, wherein the monitoring circuitry: outputsthe collected data, the indication of the current configuration of themonitoring circuitry, and the indication of the new configuration of themonitoring circuitry to an on-chip controller; and receives thereconfiguration command from the on-chip controller.
 19. An integratedcircuit chip comprising: monitoring circuitry coupled to a peripheralcircuit, the monitoring circuitry having a current configuration, andbeing configured to collect data related to the peripheral circuit andoutput that collected data in a message stream; the monitoring circuitrybeing further configured to: transmit an indication of the currentconfiguration of the monitoring circuitry, then reconfigure the currentconfiguration of the monitoring circuitry to a new configuration of themonitoring circuitry in accordance with a reconfiguration command, thentransmit an indication of the new configuration of the monitoringcircuitry; wherein the monitoring circuitry is configured to interleavethe indication of the current configuration of the monitoring circuitryand the indication of the new configuration of the monitoring circuitryinto the message stream to be time-synchronised with the collected datain the message stream.
 20. An electronic device comprising an integratedcircuit chip, the integrated circuit chip comprising: monitoringcircuitry coupled to a peripheral circuit, the monitoring circuitryhaving a current configuration, and being configured to collect datarelated to the peripheral circuit and output that collected data in amessage stream; the monitoring circuitry unit being further configuredto: transmit an indication of the current configuration of themonitoring circuitry, then reconfigure the current configuration of themonitoring circuitry to a new configuration of the monitoring circuitryin accordance with a reconfiguration command, then transmit anindication of the new configuration of the monitoring circuitry; whereinthe monitoring circuitry is configured to interleave the indication ofthe current configuration of the monitoring circuitry and the indicationof the new configuration of the monitoring circuitry into the messagestream to be time-synchronised with the collected data in the messagestream.